/*division of the long on the short*/

public class Division {

	public static int[] returnArrayInt(String str) {
		int[]  out = new int [str.length()];
		char[] buf = new char[str.length()];
		str.getChars(0, str.length(), buf, 0);
		
		for(int i=0; i < str.length(); i++)
		out[i]=Character.getNumericValue(buf[i]);
		
		return out;
	}
	public static void main(String[] args)  {
		
        String stringDivident  = "54532412364586797813650345";
        int    arrayDivident[] = new int [100];
        int    arrayDivisor    =   5143;
        int    boofA[]         = new int [stringDivident.length()];
        
        boofA = returnArrayInt( stringDivident );
        for (int i=0; i < boofA.length; i++)
        	arrayDivident[i] = boofA[i];
        	        
        boolean   IsPoint    = false;
        String    strOut     = "";
        int       countStep  = 0;
        int       afterPoint = 10;
        int       count      = 0;

        while( (count - afterPoint < stringDivident.length() ) && ( countStep - afterPoint < stringDivident.length() )){
        	if( !IsPoint && count == stringDivident.length() ){
        		strOut+=".";
        		IsPoint=true;
        	}       
     
        	if ( arrayDivident[count] >= arrayDivisor ){
        		int boofRes = arrayDivident[count] % arrayDivisor;
        		int boofer  = arrayDivident[count] / arrayDivisor;

        		arrayDivident[count+1] += boofRes*10;
        		strOut += boofer;
        		count++;        		
        	}
        	else{
            	strOut +="0";
            	count++;
            	arrayDivident[count] = arrayDivident[count-1]*10 + arrayDivident[count];
               	countStep++;
        	}

        }

        System.out.println( strOut);
	}

}
